package com.api.shopapi.service;

import com.api.shopapi.entity.Building;
import com.api.shopapi.entity.Room;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface RoomService {

    int insert(Room room);

    int updateByRoomCode(Room room);

    int deleteByRoomCode(String roomCode);

    List<Room> getListAll();

    Room getByRoomCode(String roomCode);

    //查找楼宇信息
    Building getByRoomCodeToBuilding(String roomCode);


    Room getByNumber(String number, String buildingCode, String institutionCode);

    List<Room> getListAllByInstitutionCode(String institutionCode);

    List<Room> getListByBuildingCode(String buildingCode);

    PageInfo<Room> getPageList(int pageIndex, int pageSize, String institutionCode, int number, String buildingCode, String roomTypeCode, int status);

    List<Room> getListByBuildingCodeAndStatus0(String buildingCode);

    List<Room> getListByBuildingCodeAndNumAndStatusNot1(String buildingCode,int num);

    List<Room> getByInstitutionCodeAndStatusNot11(String institutionCode);

    List<Room> getListByBuildingCodeAndStatusNot1(String buildingCode);

    List<Room> getListInRoomTypePriceMonth(String institutionCode, double priceMonth);


    PageInfo<Room> pageByGovCode(int pageIndex, int pageSize, String governmentCode);

}
